<extend name="layout/admin" />
<block name="title"><title>分类列表页</title></block>
<block name="content">
	<div class="col-md-12 graphs">
	    <div class="xs">
	  		<h3>分类列表</h3>
			<div class="bs-example4" data-example-id="simple-responsive-table">
			    <div class="table-responsive">
			      <table class="table table-bordered">
			        <thead>
			          <tr>
			            <th>ID</th>
			            <th style="width:10%;">logo</th>
			            <th>分类名称</th>
			            <th>父级分类</th>
			            <th>简介</th>
			            <th>操作</th>
			          </tr>
			        </thead>
			        <tbody>
			        <foreach name="res" item="vo" >
			          <tr>
			            <th scope="row">{$vo['id']}</th>
			            <td>
			            	<if condition="!empty($vo['logo'])"><img src="__PUBLIC__/Uploads/cate/{$vo['logo']}" style="width:110%;" alt="">
			           		</if>
			            </td>
			            <td>{$vo['name']}</td>
			            <td>{$vo['pid']|getCateName}</td>
			            <td>
		            		<p title="{$vo['intro']}" style="width:40px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">{$vo['intro']}</p>
			            </td>
			            <td>
							<a href="{:U('admin/cate/edit',array('id'=>$vo['id']))}">重命名</a>&nbsp;|&nbsp;
			            	<a href="{:U('admin/cate/delete',array('id'=>$vo['id']))}">删除</a>&nbsp;|&nbsp;
							<a href="{:U('admin/cate/add',array('pid'=>$vo['id']))}">添加子分类</a>
						</td>
			          </tr>
			        </foreach>
			        </tbody>
			      </table>
			      <div style="float:right;">
			      	{$page}
			      </div>
			    </div>
		  	</div>
  		</div>
   </div>
</block>